package pro.softzhang.algo.lc1000;

import pro.softzhang.algo.flag.theme.TMathArith;

/**
 *
 */
@TMathArith
public class LC1015_SmallestIntegerDivisibleByK {
    public static void main(String[] args) {

    }

    /**
     *
     */
    static
    class Solution {
        public int smallestRepunitDivByK(int k) {
            if(k % 2 == 0) return -1;
            for(int i = 1, n = 1 % k; i <= k; i++) {
                if (n == 0) return i;
                n = (n * 10 + 1) % k;
            }
            return -1;
        }
    }
}
